Skip to content

Conversation

KoenZomers
Copy link
Collaborator

Type

  • Bug Fix
  • New Feature
  • Sample

Related Issues?

N/A

What is in this Pull Request ?

Added -OpenDocumentsIn option to Set-PnPList which allows configuring if documents should be opened in the browser or in the local client

@gautamdsheth
Copy link
Collaborator

Can we use -OpenDocumentsMode as parameter name ? Maybe also add an additional check to determine if the list is actually document library , I think the template enum was 101, if not add warning this wont work ?

@KoenZomers
Copy link
Collaborator Author

Changed the parameter name as suggested. Just tested doing this for a normal list and it doesn't return any errors. I personally think we might be introducing more problems than we're solving things by trying to add a check for the type of list. It probably works on other types as well, what if content type inherited from, etc. I'm tempted to leave the check out. What do you think?

@KoenZomers
Copy link
Collaborator Author

I now see we're actually using the doclib check already, so I guess it does work well:

if (list.BaseType == BaseType.DocumentLibrary)

Let me add it for this PR too then.

@gautamdsheth gautamdsheth merged commit 532f66d into pnp:dev Mar 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants